﻿namespace FFF.Test.Application.Repositories.FW
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using Abp.Application.Services.Dto;
    using Abp.AutoMapper;
    using FFF.Test.Entity.FW;
    using FFF.Test.Entity.FW.View;

    /// <summary>
    /// 1.004 获取站内模块信息(于大明)输入dto
    /// </summary>
    public class GetUserSetFunctionInDto
    {
        /// <summary>
        /// 用户的GUID
        /// </summary>
        public Guid UserGUID { get; set; }
    }

    /// <summary>
    /// 1.004 获取站内模块信息(于大明)输出dto
    /// </summary>
    public class GetUserSetFunctionOutDto
    {
        /// <summary>
        /// 系统集合
        /// </summary>
        public List<UserSetModuleMyApplication> UserSetModuleMyApplications { get; set; }

        /// <summary>
        /// 模块集合
        /// </summary>
        public List<UserSetModuleMyModule> UserSetModuleMyMudules { get; set; }

        /// <summary>
        /// 模块的集合
        /// </summary>
        public List<UserSetModuleMyFunction> UserSetModuleMyFunctions { get; set; }

        /// <summary>
        /// 选中的模块的集合
        /// </summary>
        public List<ChooseMyFunction> ChooseMyFunctions { get; set; }
    }

    /// <summary>
    /// 系统类
    /// </summary>
    [AutoMapFrom(typeof(ViewFWApplication))]
    public class UserSetModuleMyApplication
    {
        /// <summary>
        /// 系统GUID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 系统名称
        /// </summary>
        public string ApplicationName { get; set; }
    }

    /// <summary>
    /// 模块类
    /// </summary>
    [AutoMapFrom(typeof(ViewFWApplication2Module))]
    public class UserSetModuleMyModule
    {
        /// <summary>
        /// 应用系统GUID
        /// </summary>
        [Display(Name = "应用系统GUID", Description = "应用系统GUID")]
        [Column("ApplicationGUID")]
        public Guid? ApplicationGUID { get; set; }

        /// <summary>
        /// 模块GUID
        /// </summary>
        [Display(Name = "模块GUID", Description = "模块GUID")]
        [Column("ModuleGUID")]
        public Guid? ModuleGUID { get; set; }

        /// <summary>
        /// 模块名称
        /// </summary>
        [Display(Name = "模块名称", Description = "模块名称")]
        [Column("ModuleName")]
        [StringLength(256)]
        public string ModuleName { get; set; }
    }

    /// <summary>
    /// 模块类
    /// </summary>
    [AutoMapFrom(typeof(ViewFWFunction))]
    public class UserSetModuleMyFunction
    {
        /// <summary>
        /// 系统GUID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 模块GUID
        /// </summary>
		[Display(Name = "模块GUID", Description = "模块GUID")]
        [Column("ModuleGUID")]
        public Guid? ModuleGUID { get; set; }

        /// <summary>
        /// 功能名称
        /// </summary>
        [Display(Name = "功能名称", Description = "功能名称")]
        [Column("FunctionName")]
        [StringLength(100)]
        public string FunctionName { get; set; }

        /// <summary>
        /// 是否是选中的状态
        /// </summary>
        public int IsChoose { get; set; }

        /// <summary>
        /// 字级模块
        /// </summary>
        public List<UserSetModuleMyFunction> MyChildFuntion { get; set; }
    }

    /// <summary>
    /// 选择的模块
    /// </summary>
    [AutoMapFrom(typeof(ViewFWFunction))]
    public class ChooseMyFunction
    {
        /// <summary>
        /// 系统GUID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 模块GUID
        /// </summary>
        [Display(Name = "模块GUID", Description = "模块GUID")]
        [Column("ModuleGUID")]
        public Guid? ModuleGUID { get; set; }

        /// <summary>
        /// 功能名称
        /// </summary>
        [Display(Name = "功能名称", Description = "功能名称")]
        [Column("FunctionName")]
        [StringLength(100)]
        public string FunctionName { get; set; }

        /// <summary>
        /// OrderCode
        /// </summary>
        public string FunctionOrderCode { get; set; }
    }
}
